#include "session.h"

Session::Session()
{

}

void Session::setId(QString id)
{
    this->id = id;
}

QBool Session::Equals(QString id)
{
    return QBool(this->id.compare(id) == 0);
}

QString Session::getId()
{
    return id;
}

void Session::setUser(QString username)
{
    this->username = username;
}

QString Session::getUser()
{
    return username;
}

void Session::cleanRooms()
{
    roomList.clear();
}

void Session::addRoom(Room* room)
{
    roomList.append(room);
}

Room* Session::getRoom(int i)
{
    return roomList[i];
}

int Session::getRoomCount()
{
    return roomList.size();
}
